package ar.edu.unq.leezsi.html.head;

import ar.edu.unq.leezsi.html.OpenCloseComponent;
import ar.edu.unq.leezsi.html.javascript.JavaScriptReference;
import ar.edu.unq.leezsi.model.ResourceModel;

public class Head<T> extends OpenCloseComponent<T> {
	private Title title;

	public Head() {
		this.add(new JavaScriptReference(this.getClass(), "jquery-1.7.1.js"));
		this.add(new JavaScriptReference(this.getClass(), "knockout.js"));
		this.add(this.title = new Title());
	}

	public final void setTitle(String title) {
		this.title.setModel(new ResourceModel(title, title));
	}

	@Override
	protected String tag() {
		return "head";
	}

}
